home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
Apple Script
/
scripts
/
PM Import
/
Read Me
< prev
Wrap
Text File
|
1994-01-20
|
1KB
|
22 lines
I managed to get hold of a colection of 242 tiff files--all with DOS-style filenames
that were completely meaningless to me. Having no way of knowing what each graphic
looked like, and not wanting to manually open up 242 files one at a time, I decided to
take advantage of PageMaker's scripting ability and AppleScript. The result is the
accampanying script.
This script gets a list of all the files in a folder (the foldername is hard-coded in the
script). A repeat loop then traverses the list and, taking one file at a time, imports
the file, resizes it, at places it within a 3 by 4 grid. The filename is used as a
caption which is placed below each graphic.
This script could be easily modified for any similar tasks. It would be great for creating
a membership directory where photos of members were scaned and named with the individual's
name.
PageMaker presents somewhat of a challenge for this type of script because it only
recognizes the "do script" and "evaluate" Apple Events. Each step of the script must
be sent one at a time as text. I got around this by combining text literals and variables
and then placing the result in a variable. I then passed the variables to PageMaker.
Any questions or comments can be sent to jsteele@access.digex.net (Jeff Steele).